# 读取图片
from PIL import Image
import numpy as np
img_pil = Image.open('study.jpg')
print('img_pil', img_pil)
img_pil = np.array(img_pil)
print('大小为: '+str(img_pil.size))
print('形状为: '+str(img_pil.shape))

# 保存图片
import requests
url = 'https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=1546500353,2204894501&fm=26&gp=0.jpg'
response = requests.get(url)
f = open('test.jpg', 'ab')
f.write(response.content)
f.close()
